<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@page import="java.util.*"%>


<%
	request.getRequestDispatcher("/jsp/BaseInclude.jsp").include(
			request, response);
%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
			
	List<Object[]> uploadlist = (ArrayList<Object[]>)request.getAttribute("uploadList");
	for(Object[] o : uploadlist){
					System.out.println("ID: "+o[0]);	
					System.out.println("Name: "+o[1]);	
					System.out.println("Date: "+o[2]);	
					System.out.println("FileName: "+o[3]);	
					System.out.println("Upload Status: "+o[4]);	
		}	
			
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<base href="<%=basePath%>">

		<meta http-equiv="Content-Type"
			content="text/html; charset=ISO-8859-1">
		<title>Upload List</title>
		<script type="text/javascript">
		function goBack(){
		window.location.href = "<%=basePath%>jsp/Dashboard.jsp";
		}
		</script>
	</head>
	<body>
		<form action="jsp/Upload.jsp">
			<div id="main">
				<jsp:include page="Logo.jsp"></jsp:include><div id="top-blue-line"></div>
				<div id="main">
					<div id="margin-top">
						<div id="content">
							<div id="wid-228">

								<fieldset
									style="float: none; width: 220px; padding: 15px 0px 14px 0px; text-align: left; border: #009fbf 1px solid; margin-bottom: 18px; height: auto;">
									<legend
										style="COLOR: #108010; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 8pt; FONT-WEIGHT: normal; padding-left: 10pt; TEXT-DECORATION: none">
										<b><i>UPLOADLIST:</i>
										</b>
									</legend>

									<table border="0" align="center" cellpadding="10" width="980"
										cellspacing="0">
										<tr bgcolor="yellow" height="10">
											<td colspan="3">
												<b><i><font><bean:message key="Id" />
													</font>
												</i>
												</b>
											</td>
											<td colspan="3">
												<b><i><bean:message key="Filename" />
												</i>
												</b>
											</td>
											<td colspan="3">
												<b><i><bean:message key="UploadDate" />
												</i>
												</b>
											</td>
											<td colspan="3">
												<b><i><bean:message key="Checker" />
												</i>
												</b>
											</td>
										</tr>
									
									<% for(Object[] o : uploadlist){%>
										<tr>

											<td colspan="3">
												<%=o[0] %>
											</td>
											<td colspan="3">
												<%=o[4] %>
											</td>
											<td colspan="3">
												<%=o[3] %>
											</td>
											<td colspan="3">
												<%out.println("Uploaded");%>											
												 
											</td>
										</tr>
										<%} %>

									</table>
								</fieldset>
								<fieldset
									style="float: none; width: 220px; padding: 15px 0px 14px 0px; text-align: left; border: #009fbf 1px solid; margin-bottom: 18px; height: auto;">
									<table border="0" align="center" cellpadding="10" width="980"
										cellspacing="0">
										<tr>
											<td align="right">
												<html:submit styleClass="submit" style="cursor:pointer"
													value="Upload" />
											</td>
											<td align="center">
												<html:button styleClass="submit" style="cursor:pointer"
													property="addnew" value="Back" onclick="goBack()"></html:button>
											</td>
										</tr>
										<tr>
										</tr>
									</table>
								</fieldset>
							</div>
						</div>
					</div>
				</div>
			</div>
		</form>

	</body>
</html>